#include "ballskin.h"
extern int ball_skin;

BallSkin::BallSkin(QWidget *parent) :
    QWidget(parent)
{
    setupUi(this);
    inite_ballskin();
}

void BallSkin::inite_ballskin()
{
    setFixedSize(500,300);
    setWindowTitle("选择小球");
    setWindowIcon(QIcon(":/sucai/panda.png"));
}

void BallSkin::show_ballskin()
{
    this->show();
}

void BallSkin::paintEvent(QPaintEvent *)
{
    QPainter bsk(this);
    bsk.drawPixmap(0,0,800,800,QPixmap(":/sucai/blackback.png"));
}


void BallSkin::on_ball_clicked()
{
    ball_skin = 1;
    this->close();
}

void BallSkin::on_panda_clicked()
{
    ball_skin = 2;
    this->close();
}

void BallSkin::on_toolButton_clicked()
{
    ball_skin = 3;
    this->close();
}
